<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>小飞象-会员中心-商品管理</title>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_810097_mgs6xzz1oj.css">
    <link rel="stylesheet" href="css/common/reset.css">
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="css/reset-layui.css">
    <link rel="stylesheet" href="css/header.css">
    <link rel="stylesheet" href="css/common/nav.css">
    <link rel="stylesheet" href="css/common/aside.css">
    <link rel="stylesheet" href="css/common/content.css">
    <link rel="stylesheet" href="css/goods.min.css">
</head>

<body>
    <header>
        <div class="wrapper">
            <div class="clearfix headerBox">
                <h1 class="fl logo">
                    <a href="">小飞象</a>
                </h1>
                <!-- <div class="fl alipayName">支付宝充值账号: <b class="redColor">156****8656</b>开户人: <b class="redColor">陈小窝</b></div> -->
                <div class="fr logOut">退出</div>
                <div class="fr userName"></div>
            </div>
        </div>
    </header>
    <div class="mhNav">
        <ul class="navMenuBox">
            <li>
                <a href="index.html">
                    飞象首页
                </a>
            </li>
            <li class="memberUser">
                <a href="javascript:;" class="active">
                    会员中心
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="member/basicInfo.html">基本资料</a>
                    </li>
                    <li>
                        <a href="member/storeMage.html">店铺管理</a>
                    </li>
                    <li>
                        <a href="member/readjustNum.html">调整单量</a>
                    </li>
                    <li>
                        <a href="goodsMage.html">商品管理</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    计划管理
                    <!-- <i class="iconfont icon-arrow-up mhArrowIcon"></i>
                    <i class="iconfont icon-arrow-down mhArrowIcon"></i> -->
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="plan/newPlan.html">新建计划</a>
                    </li>
                    <li>
                        <a href="plan/planMage.html">计划管理</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    订单管理
                    <!-- <i class="iconfont icon-arrow-up mhArrowIcon"></i>
                    <i class="iconfont icon-arrow-down mhArrowIcon"></i> -->
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="order/orderMage.html">订单管理</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    资金管理
                    <!-- <i class="iconfont icon-arrow-up mhArrowIcon"></i>
                    <i class="iconfont icon-arrow-down mhArrowIcon"></i> -->
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="capital/inAccout.html">账号充值</a>
                    </li>
                    <li>
                        <a href="capital/transferMage.html">转账管理</a>
                    </li>
                    <li>
                        <a href="capital/orderMage/dailyTaskDes.html">订单信息</a>
                    </li>
                    <li>
                        <a href="capital/expressForm.html">获取快递底单</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="">在线客服</a>
            </li>
        </ul>
    </div>
    <div class="clearfix wrapper mainBomContent">
        <!-- 会员中心-基本资料 -->
        <div class="asideMenu">
            <h2 class="title">
                <i class="iconfont icon--"></i> 会员中心
            </h2>
            <ul>
                <li>
                    <a href="member/basicInfo.html">基本资料</a>
                </li>
                <li>
                    <a href="member/storeMage.html">店铺管理</a>
                </li>
                <li>
                    <a href="member/readjustNum.html">调整单量</a>
                </li>
                <li class="active">
                    <a href="goodsMage.html">商品管理</a>
                </li>
            </ul>
        </div>
        <div class="rightContent">
            <div class="goodsDetInfoView">
                <h2>商品详细信息</h2>
                <form class="layui-form" action="">
                    <!-- <div class="layui-form-item">
                        <label class="layui-form-label">店铺名称：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" value="芳屿建材" id="">
                        </div>
                    </div> -->
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品简称：</label>
                        <div class="layui-input-block">
                            <p id="goodsInfo"></p>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品链接：</label>
                        <div class="layui-input-block">
                            <p id="goodsLink"></p>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品名称：</label>
                        <div class="layui-input-block">
                            <p id="goodsName"></p>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">二维码展示图：</label>
                        <div class="layui-input-block">
                            <img id="qrCode" width="128" src="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">无线端商品主图：</label>
                        <div class="layui-input-block">
                            <img id="imgWireless" width="128" src="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">pc端主图：</label>
                        <div class="layui-input-block">
                            <img id="imgPc" width="128" src="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">手机端搜索主图：</label>
                        <div class="layui-input-block">
                            <img id="imgPhone" width="128" src="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">pc端搜索主图：</label>
                        <div class="layui-input-block">
                            <img id="imgEnd" width="128" src="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">淘口令入口主图：</label>
                        <div class="layui-input-block">
                            <img id="imgCode" width="128" src="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">直通车入口主图：</label>
                        <div class="layui-input-block">
                            <img id="imgTrain" width="128" src="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <div class="layui-input-inline" style="width:128px;">
                                <button type="button" class="layui-btn layui-btn-primary closeBtn">关闭</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="js/jquery.min.js"></script>
    <script src="layui/layui.js"></script>
    <script src="js/jquery.cookie.js"></script>
    <script src="js/dataRequest.js"></script>
    <script>
        var mid = $.cookie('id');
        if (!mid) {
            window.location.href = "/login.html";
        }
        $(".mhNav .navMenuBox > li > a").click(function (event) {
            if ($(this).siblings('ul').is(':visible')) {
                $(this).siblings('ul').stop(true, true).slideUp();
                $(this).removeClass('active')
            } else {
                $(this).siblings('ul').stop(true, true).slideDown().parents('li').siblings().find('ul').stop(true, true).slideUp();
                $(this).addClass('active').parents('li').siblings().find('a').removeClass('active');
            }
        });
        // 获取url地址参数
        var goodsId = getQueryString("id");
        console.log("url地址携带的id", goodsId);
        $(document).ready(function () {
            $.ajax({
                type: "GET",
                url: BASE_URL + MAP_URL + 'goods/' + goodsId,
                dataType: "json",
                global: false,
                success: function (data) {
                    console.log("data", data)
                    var qrCode = SERVE_URL + data.data.qrCode;
                    var imgWireless = SERVE_URL + data.data.imgWireless;
                    var imgPc = SERVE_URL + data.data.imgPc;
                    var imgPhone = SERVE_URL + data.data.imgPhone;
                    var imgEnd = SERVE_URL + data.data.imgEnd;
                    var imgCode = SERVE_URL + data.data.imgCode;
                    var imgTrain = SERVE_URL + data.data.imgTrain;
                    $("#goodsInfo").text(data.data.goodsInfo);
                    $("#goodsLink").text(data.data.goodsLink);
                    $("#goodsName").text(data.data.goodsName);
                    $("#qrCode").attr("src", qrCode);
                    $("#imgWireless").attr("src", imgWireless);
                    $("#imgPc").attr("src", imgPc);
                    $("#imgPhone").attr("src", imgPhone);
                    $("#imgEnd").attr("src", imgEnd);
                    $("#imgCode").attr("src", imgCode);
                    $("#imgTrain").attr("src", imgTrain);
                }
            });
        });
        $(".closeBtn").on("click", function () {
            window.location = "goodsMage.html";
        });
        // 正则分析获取url地址参数函数
        function getQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]); return null;
        }
    </script>
</body>

</html>